package com.haibara.aiojcodesandbox.controller;

import cn.hutool.core.io.FileUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.File;

@RestController
@RequestMapping("/health")
public class HealthController {
    @GetMapping("/checkHealth")
    public String health(){
        return "ok";
    }

    @GetMapping("/doc")
    public void doc(){
        String globalCodePath = System.getProperty("user.dir") + File.separator + "judgeCode";
        System.out.println("globalCodePath"+globalCodePath);
        FileUtil.mkdir(globalCodePath);
    }

}
